package com.aurora.spider.gitee;

import com.geccocrawler.gecco.annotation.Gecco;
import com.geccocrawler.gecco.annotation.HtmlField;
import com.geccocrawler.gecco.annotation.Request;
import com.geccocrawler.gecco.annotation.RequestParameter;
import com.geccocrawler.gecco.request.HttpRequest;
import com.geccocrawler.gecco.spider.HtmlBean;

import java.util.List;

/**
 * Created by jackie on 18/1/15.
 */
@Gecco(matchUrl="https://search.gitee.com/?skin=rec&type=repository&q={topicName}&lang=java&sort=stars_count&pageno={pageNum}", pipelines={"consolePipeline","giteeAllSortPipeline"})
public class AllSort implements HtmlBean {
    private static final long serialVersionUID = 665662335318691818L;

    @Request
    private HttpRequest request;

    @RequestParameter
    private Integer pageNum;

   @RequestParameter
   private  String topicName;
    // 查询结果
    @HtmlField(cssPath="#hits-list .item")
    private List<HitProject> projectList;

    public HttpRequest getRequest() {
        return request;
    }

    public void setRequest(HttpRequest request) {
        this.request = request;
    }

    public List<HitProject> getProjectList() {
        return projectList;
    }

    public Integer getPageNum() {
        return pageNum;
    }

    public void setPageNum(Integer pageNum) {
        this.pageNum = pageNum;
    }

    public void setProjectList(List<HitProject> projectList) {
        this.projectList = projectList;
    }

    public String getTopicName() {
        return topicName;
    }

    public void setTopicName(String topicName) {
        this.topicName = topicName;
    }
}
